package com.lanchetech.user.controller;


import com.lanchetech.bean.response.ResultData;
import com.lanchetech.entity.Spu;
import com.lanchetech.user.service.LocalizedService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(value = "本地生活",tags = "本地生活")
@RestController
@RequestMapping("/api/localized")
public class LocalizedController {

    @Autowired
    LocalizedService localizedService;

    @ApiOperation("查询商品")
    @GetMapping("/selectByName")
    public ResultData<List<Spu>> selectByName(@RequestParam("name") String name) {
        return localizedService.selectByName(name);
    }
}
